import {constantFormatHtml, setColumnsDefaultKey} from '@/utils/common'

let column = [
  {
    columnKey: 'index',
    type: 'index',
    width: 45,
    align: 'center',
    showOverflowTooltip: true
  },
  {
    prop: 'NodeName',
    label: '菜单名称',
    showOverflowTooltip: true,
    minWidth: 140,
    slot: 'NodeName'
  },
  {
    prop: 'ControllerName',
    label: '控制器',
    width: 120,
    showOverflowTooltip: true,
  },
  {
    prop: 'ActionName',
    label: '入口方法',
    width: 120,
    showOverflowTooltip: true,
  },
  {
    prop: 'NodeOrder',
    label: '排序号',
    align: 'center',
    width: 60,
    showOverflowTooltip: true,
  },
  {
    prop: 'NodeShowType',
    label: '可见',
    align: 'center',
    showOverflowTooltip: true,
    width: 60,
    formatter: (row, column, val) => {
      return constantFormatHtml(val, 'Is')
    }
  },
  {
    prop: 'NodeType',
    label: '类型',
    align: 'center',
    showOverflowTooltip: true,
    width: 80,
    slot: 'NodeType'
  },
  {
    columnKey: 'action',
    label: '操作',
    width: 220,
    align: 'center',
    resizable: false,
    slot: 'action'
  }
]

export default setColumnsDefaultKey(column)
